<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>康臣药业集团财务分析及风险管控报告（2013-2024年）</title>
    <script src="./chart.js"></script>
    <script src="./chartjs-adapter-date-fns.bundle.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        .header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            text-align: center;
        }

        .header p {
            text-align: center;
            font-size: 1.2em;
            opacity: 0.9;
        }

        .dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        }

        .card h3 {
            color: #667eea;
            margin-bottom: 15px;
            font-size: 1.3em;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }

        .metric {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 10px 0;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .metric-label {
            font-weight: 600;
            color: #555;
        }

        .metric-value {
            font-weight: bold;
            color: #667eea;
            font-size: 1.1em;
        }

        .positive {
            color: #28a745;
        }

        .negative {
            color: #dc3545;
        }

        .chart-container {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }

        .chart-title {
            color: #667eea;
            font-size: 1.5em;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
        }

        .chart-wrapper {
            position: relative;
            height: 400px;
            margin-bottom: 20px;
        }

        .risk-section {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }

        .risk-item {
            background: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: 15px;
            margin: 10px 0;
            border-radius: 5px;
        }

        .risk-high {
            background: #f8d7da;
            border-left-color: #dc3545;
        }

        .risk-medium {
            background: #fff3cd;
            border-left-color: #ffc107;
        }

        .risk-low {
            background: #d1ecf1;
            border-left-color: #17a2b8;
        }

        .recommendations {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }

        .recommendation-item {
            background: #d4edda;
            border-left: 4px solid #28a745;
            padding: 15px;
            margin: 10px 0;
            border-radius: 5px;
        }

        .tabs {
            display: flex;
            background: white;
            border-radius: 15px 15px 0 0;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .tab {
            flex: 1;
            padding: 15px 20px;
            background: #f8f9fa;
            border: none;
            cursor: pointer;
            font-size: 1em;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .tab.active {
            background: #667eea;
            color: white;
        }

        .tab-content {
            background: white;
            padding: 25px;
            border-radius: 0 0 15px 15px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }

        .tab-pane {
            display: none;
        }

        .tab-pane.active {
            display: block;
        }

        @media (max-width: 768px) {
            .container {
                padding: 10px;
            }
            
            .header h1 {
                font-size: 1.8em;
            }
            
            .dashboard {
                grid-template-columns: 1fr;
            }
            
            .chart-wrapper {
                height: 300px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>康臣药业集团财务分析及风险管控报告</h1>
            <p>报告期间：2013-2024年 | 报告视角：上市财务及风控经理</p>
        </div>

        <!-- 核心指标仪表板 -->
        <div class="dashboard">
            <div class="card">
                <h3>营业收入增长</h3>
                <div class="metric">
                    <span class="metric-label">2013年营业额</span>
                    <span class="metric-value">5.72亿元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">2024年营业额</span>
                    <span class="metric-value">29.67亿元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">年均复合增长率</span>
                    <span class="metric-value positive">18.1%</span>
                </div>
            </div>

            <div class="card">
                <h3>盈利能力</h3>
                <div class="metric">
                    <span class="metric-label">2024年税前溢利</span>
                    <span class="metric-value">10.20亿元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">每股盈利(2024)</span>
                    <span class="metric-value">1.11元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">EPS增长(2013-2024)</span>
                    <span class="metric-value positive">+455%</span>
                </div>
            </div>

            <div class="card">
                <h3>资产规模</h3>
                <div class="metric">
                    <span class="metric-label">2024年总资产</span>
                    <span class="metric-value">58.53亿元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">年均扩张率</span>
                    <span class="metric-value positive">13.7%</span>
                </div>
                <div class="metric">
                    <span class="metric-label">资本负债比率(2023)</span>
                    <span class="metric-value">13.9%</span>
                </div>
            </div>

            <div class="card">
                <h3>风险指标</h3>
                <div class="metric">
                    <span class="metric-label">2019年商誉减值</span>
                    <span class="metric-value negative">3.21亿元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">2013年上市募资</span>
                    <span class="metric-value">7.75亿元</span>
                </div>
                <div class="metric">
                    <span class="metric-label">现金状态</span>
                    <span class="metric-value positive">净现金</span>
                </div>
            </div>
        </div>

        <!-- 图表标签页 -->
        <div class="tabs">
            <button class="tab active" onclick="showTab('revenue')">营业收入趋势</button>
            <button class="tab" onclick="showTab('profit')">税前溢利分析</button>
            <button class="tab" onclick="showTab('netprofit')">净利润趋势</button>
            <button class="tab" onclick="showTab('assets')">资产负债结构</button>
            <button class="tab" onclick="showTab('ratios')">财务比率分析</button>
        </div>

        <div class="tab-content">
            <div id="revenue" class="tab-pane active">
                <div class="chart-title">营业收入增长趋势（2013-2024年）</div>
                <div class="chart-wrapper">
                    <canvas id="revenueChart"></canvas>
                </div>
            </div>

            <div id="profit" class="tab-pane">
                <div class="chart-title">税前溢利变化趋势</div>
                <div class="chart-wrapper">
                    <canvas id="profitChart"></canvas>
                </div>
            </div>

            <div id="netprofit" class="tab-pane">
                <div class="chart-title">净利润增长趋势</div>
                <div class="chart-wrapper">
                    <canvas id="netProfitChart"></canvas>
                </div>
            </div>

            <div id="assets" class="tab-pane">
                <div class="chart-title">资产负债结构分析</div>
                <div class="chart-wrapper">
                    <canvas id="assetsChart"></canvas>
                </div>
            </div>

            <div id="ratios" class="tab-pane">
                <div class="chart-title">关键财务比率趋势</div>
                <div class="chart-wrapper">
                    <canvas id="ratiosChart"></canvas>
                </div>
            </div>
        </div>

        <!-- 风险评估 -->
        <div class="risk-section">
            <h3 style="color: #667eea; margin-bottom: 20px; font-size: 1.5em;">风险管控现状评估</h3>
            
            <div class="risk-item risk-high">
                <h4>高风险：商誉及资产减值风险</h4>
                <p>2019年因收购标的业绩未达预期，计提商誉减值3.21亿元及无形资产减值0.05亿元，导致税前溢利下降78.3%，暴露并购整合风险。</p>
            </div>

            <div class="risk-item risk-medium">
                <h4>中等风险：信贷风险管控</h4>
                <p>贸易应收款账期从2013年180天缩短至2014年90天，但未披露具体逾期率及坏账损失数据，需加强动态监控与预警机制。</p>
            </div>

            <div class="risk-item risk-medium">
                <h4>中等风险：汇率风险</h4>
                <p>集团交易以人民币及港元为主，2013-2024年未采用金融工具对冲外汇风险，依赖自然对冲，存在潜在汇兑损失。</p>
            </div>

            <div class="risk-item risk-low">
                <h4>低风险：资金使用效率</h4>
                <p>集团长期维持"净现金"状态，2013年上市募资7.75亿元存放银行定期，闲置资金收益有限，需提升资金使用效率。</p>
            </div>
        </div>

        <!-- 关键数据洞察 -->
        <div class="chart-container">
            <h3 style="color: #667eea; margin-bottom: 20px; font-size: 1.5em;">关键数据洞察</h3>
            <div class="dashboard">
                <div class="card">
                    <h3>收入增长表现</h3>
                    <div class="metric">
                        <span class="metric-label">2014年增长率</span>
                        <span class="metric-value positive">27.8%</span>
                    </div>
                    <div class="metric">
                        <span class="metric-label">2022-2024年平均增长</span>
                        <span class="metric-value positive">14.5%</span>
                    </div>
                </div>
                <div class="card">
                    <h3>盈利恢复能力</h3>
                    <div class="metric">
                        <span class="metric-label">2019年净利润下滑</span>
                        <span class="metric-value negative">-82.8%</span>
                    </div>
                    <div class="metric">
                        <span class="metric-label">2024年净利润增长</span>
                        <span class="metric-value positive">+16.1%</span>
                    </div>
                </div>
                <div class="card">
                    <h3>资本结构优化</h3>
                    <div class="metric">
                        <span class="metric-label">2017年最高负债率</span>
                        <span class="metric-value">32.5%</span>
                    </div>
                    <div class="metric">
                        <span class="metric-label">2024年负债率</span>
                        <span class="metric-value positive">12.5%</span>
                    </div>
                </div>
                <div class="card">
                    <h3>应收账款管理</h3>
                    <div class="metric">
                        <span class="metric-label">2013年账期</span>
                        <span class="metric-value">180天</span>
                    </div>
                    <div class="metric">
                        <span class="metric-label">2014年优化后</span>
                        <span class="metric-value positive">90天</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- 建议措施 -->
        <div class="recommendations">
            <h3 style="color: #667eea; margin-bottom: 20px; font-size: 1.5em;">管理建议</h3>
            
            <div class="recommendation-item">
                <h4>提升盈利稳定性</h4>
                <p>强化并购后商誉及无形资产的减值测试，建立定期评估机制（如每半年），避免2019年类似大额减值风险；优化成本结构，确保费用与收入增长匹配。</p>
            </div>

            <div class="recommendation-item">
                <h4>提高资金使用效率</h4>
                <p>加快2013年未使用募资（7.75亿元）的投入进度，结合当前业务需求制定明确使用计划；探索现金管理工具，在风险可控前提下提升资金收益率。</p>
            </div>

            <div class="recommendation-item">
                <h4>强化信贷风险管控</h4>
                <p>建立客户信用评级系统，根据评级动态调整账期；定期披露逾期率、坏账率等指标，纳入管理层KPI考核。</p>
            </div>

            <div class="recommendation-item">
                <h4>完善汇率风险管理</h4>
                <p>针对港元与人民币汇率波动，可尝试使用远期外汇合约对冲部分收入/支出，锁定利润。</p>
            </div>

            <div class="recommendation-item">
                <h4>合规与政策应对</h4>
                <p>密切跟踪医药行业国家政策（如集采、医保谈判），提前调整产品结构（如加大创新药研发投入），降低政策对收入的冲击。</p>
            </div>
        </div>
    </div>

    <script>
        // 标签页切换功能
        function showTab(tabName) {
            // 隐藏所有标签页内容
            const tabPanes = document.querySelectorAll('.tab-pane');
            tabPanes.forEach(pane => pane.classList.remove('active'));
            
            // 移除所有标签的active类
            const tabs = document.querySelectorAll('.tab');
            tabs.forEach(tab => tab.classList.remove('active'));
            
            // 显示选中的标签页内容
            document.getElementById(tabName).classList.add('active');
            
            // 添加active类到选中的标签
            event.target.classList.add('active');
        }

        // 图表配置
        Chart.defaults.font.family = 'Microsoft YaHei';
        Chart.defaults.font.size = 12;

        // 营业收入趋势图
        const revenueCtx = document.getElementById('revenueChart').getContext('2d');
        new Chart(revenueCtx, {
            type: 'line',
            data: {
                labels: ['2013', '2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022', '2023', '2024'],
                datasets: [{
                    label: '营业收入（亿元）',
                    data: [5.72, 7.31, 9.8, 12.5, 16.2, 20.1, 22.8, 24.5, 25.9, 25.9, 25.9, 29.67],
                    borderColor: '#667eea',
                    backgroundColor: 'rgba(102, 126, 234, 0.1)',
                    borderWidth: 3,
                    fill: true,
                    tension: 0.4
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        display: true,
                        position: 'top'
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        title: {
                            display: true,
                            text: '营业收入（亿元）'
                        }
                    },
                    x: {
                        title: {
                            display: true,
                            text: '年份'
                        }
                    }
                }
            }
        });

        // 税前溢利趋势图
        const profitCtx = document.getElementById('profitChart').getContext('2d');
        new Chart(profitCtx, {
            type: 'bar',
            data: {
                labels: ['2013', '2014', '2017', '2018', '2019', '2020', '2021', '2022', '2024'],
                datasets: [{
                    label: '税前溢利（亿元）',
                    data: [2.10, 2.64, 4.8, 6.2, 1.34, 5.8, 6.5, 7.46, 10.20],
                    backgroundColor: [
                        '#667eea', '#667eea', '#667eea', '#667eea', 
                        '#dc3545', '#667eea', '#667eea', '#667eea', '#28a745'
                    ],
                    borderColor: [
                        '#5a6fd8', '#5a6fd8', '#5a6fd8', '#5a6fd8', 
                        '#c82333', '#5a6fd8', '#5a6fd8', '#5a6fd8', '#1e7e34'
                    ],
                    borderWidth: 2
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        display: true,
                        position: 'top'
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        title: {
                            display: true,
                            text: '税前溢利（亿元）'
                        }
                    },
                    x: {
                        title: {
                            display: true,
                            text: '年份'
                        }
                    }
                }
            }
        });

        // 净利润趋势图
        const netProfitCtx = document.getElementById('netProfitChart').getContext('2d');
        new Chart(netProfitCtx, {
            type: 'line',
            data: {
                labels: ['2013', '2014', '2017', '2018', '2019', '2020', '2021', '2022', '2024'],
                datasets: [{
                    label: '净利润（亿元）',
                    data: [1.53, 2.11, 4.2, 5.8, 0.80, 5.2, 6.0, 6.83, 9.10],
                    borderColor: '#28a745',
                    backgroundColor: 'rgba(40, 167, 69, 0.1)',
                    borderWidth: 3,
                    fill: true,
                    tension: 0.4,
                    pointBackgroundColor: function(context) {
                        return context.parsed.y < 1 ? '#dc3545' : '#28a745';
                    },
                    pointBorderColor: function(context) {
                        return context.parsed.y < 1 ? '#c82333' : '#1e7e34';
                    },
                    pointRadius: 6
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        display: true,
                        position: 'top'
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        title: {
                            display: true,
                            text: '净利润（亿元）'
                        }
                    },
                    x: {
                        title: {
                            display: true,
                            text: '年份'
                        }
                    }
                }
            }
        });

        // 资产负债结构图
        const assetsCtx = document.getElementById('assetsChart').getContext('2d');
        new Chart(assetsCtx, {
            type: 'doughnut',
            data: {
                labels: ['物业、厂房及设备', '无形资产', '流动资产', '其他非流动资产'],
                datasets: [{
                    data: [15.2, 8.5, 28.3, 6.53],
                    backgroundColor: [
                        '#667eea',
                        '#764ba2',
                        '#f093fb',
                        '#f5576c'
                    ],
                    borderWidth: 2,
                    borderColor: '#fff'
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right'
                    }
                }
            }
        });

        // 财务比率分析图
        const ratiosCtx = document.getElementById('ratiosChart').getContext('2d');
        new Chart(ratiosCtx, {
            type: 'line',
            data: {
                labels: ['2013', '2017', '2018', '2019', '2020', '2021', '2022', '2023', '2024'],
                datasets: [
                    {
                        label: '资本负债比率（%）',
                        data: [0, 32.5, 18.2, 27.8, 24.7, 22.9, 14.3, 13.9, 12.5],
                        borderColor: '#667eea',
                        backgroundColor: 'rgba(102, 126, 234, 0.1)',
                        yAxisID: 'y'
                    },
                    {
                        label: '每股盈利（元）',
                        data: [0.20, 0.58, 0.65, 0.094, 0.72, 0.85, 0.92, 0.99, 1.11],
                        borderColor: '#28a745',
                        backgroundColor: 'rgba(40, 167, 69, 0.1)',
                        yAxisID: 'y1'
                    }
                ]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                interaction: {
                    mode: 'index',
                    intersect: false,
                },
                scales: {
                    x: {
                        display: true,
                        title: {
                            display: true,
                            text: '年份'
                        }
                    },
                    y: {
                        type: 'linear',
                        display: true,
                        position: 'left',
                        title: {
                            display: true,
                            text: '资本负债比率（%）'
                        }
                    },
                    y1: {
                        type: 'linear',
                        display: true,
                        position: 'right',
                        title: {
                            display: true,
                            text: '每股盈利（元）'
                        },
                        grid: {
                            drawOnChartArea: false,
                        },
                    }
                }
            }
        });
    </script>
</body>
</html> 